﻿using Library.Core.Domain.Repository;
using Synthesize.BaseSet.Domain.Aggregation.Dtos.Authority.User;
using Synthesize.BaseSet.Domain.Aggregation.Entity.Authority;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Synthesize.BaseSet.Domain.Repository.Authority
{

    /// <summary>
    /// 用户基础类
    /// </summary>
    public interface IUserRepository : IRepository<UserInfoEntity>
    {
        /// <summary>
        /// 获取用户分页信息
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pageSize"></param>
        /// <param name="spceifications"></param>
        /// <param name="orderExp"></param>
        /// <param name="inDto"></param>
        /// <param name="readOnly"></param>
        /// <returns></returns>
        Task<PageData<GetUserListOutDto>> GetUserPageList(int page, int pageSize, Expression<Func<UserInfoEntity, bool>> spceifications, (Expression<Func<GetUserListOutDto, dynamic>>, bool)[] orderExp
            ,GetUserListInDto inDto,bool readOnly);

        /// <summary>
        /// 根据条件获取用户列表信息
        /// </summary>
        /// <param name="input"></param>
        /// <param name="readOnly"></param>
        /// <returns></returns>
        Task<List<UserInfoEntity>> GetUserListByParameter(GetUserListByParameterInDto input, bool readOnly);
    }
}
